<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>产品信息</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<script type="text/javascript" src="../js/jquery-1.11.0.js" ></script>
		<script type="text/javascript" src="../js/aikxian-common.js" ></script>
		<script type="text/javascript" src="../js/Base64.min.js" ></script>
		<script type="text/javascript" src="../js/echarts.js" ></script>
		<script type="text/javascript" src="../js/rem.js" ></script>
		<script type="text/javascript" src="../js/common.js?id=0002" ></script>
		<style>
			/*===========样式常规设置=========================================*/
			body,ul,li,dl,dt,dd,p,ol,h1,h2,h3,h4,h5,h6,form,img,table,fieldset,legend{margin:0; padding:0;}
			ul,li,ol{list-style:none;}
			img,fieldset{border:0; }
			/*img{display:block;}*/
			a{text-decoration:none;}
			h1,h2,h3,h4,h5,h6{font-weight:100;}
			body{font-family: "Microsoft Yahei","微软雅黑","Tahoma","Helvetica","STHeiti";}
			input,a,select{outline:none;}
			i{font-style:normal;}
			body{
				font-size: 0.3rem;	
				background:#efefef;
				padding-bottom: 2rem;
			}
			/*字体*/
			.bigSize{
				font-size: 20px;
			}
			.normalSize{
				font-size: 0.32rem;
			}
			.littleSize{
				font-size: 0.28rem;
				
			}
			.samllSize{
				font-size: 0.24rem;
			}
			img,div,input,ul,li{
				-webkit-tap-highlight-color: transparent;
				-webkit-appearance: none;
			}
			/*===========样式常规设置end=======================================*/
			header{
				width:100%;
				height:2rem;
				background: cornflowerblue;
				z-index: 99;
				position: fixed;
				top:0;
				left:0;
				background:url(../img/bgHead.png) no-repeat left top;
				background-size: cover;
			}
			.updateTime{
				line-height: 0.5rem;
				color:#666;
				float: right;
				margin-right: 0.5rem;
				font-size: 0.24rem;
			}
			.title{
				width:74%;
				padding-left:0.1rem;
				box-sizing: border-box;
				height:1rem;
				overflow: hidden;
				float:right;
				margin-top:0.6rem;
				margin-right: 0.15rem;
				background: url(../img/kuang.png) no-repeat left top;
				background-size:cover;
				/*padding-right: 0.5rem;*/
				/*box-sizing: border-box;*/
			}
			.container{
				margin-top:1.5rem;
				/*border-top:1px solid #C0C0C0;*/
				width:100%;
				/*height:3rem;*/
				
			}
			.dataMes{
				padding-top:0.2rem;
				width:100%;
				background:#fff;
			}
			.dataUl{
				/*padding:0 0.3rem;*/
			}
			.dataUl li,.dataUl_po li{
				width:100%;
				height:1rem;
				line-height: 1rem;
				padding:0 0.3rem;
				box-sizing: border-box;
				border-bottom: 1px solid #ccc;
				color:#333;
			}
			.leftSp{
				float:left;
			}
			.rightSp{
				float:right;
			}
			
			.loading{
			width:100%;
			height:100%;
			position: fixed;
			z-index: 1024;
			background:#fff;
			top:0;
			left:0;
		}
		.loadImg{
			width:30px;
			height:30px;
			position: absolute;
			top:50%;
			left:50%;
			margin-top:-15px;
			margin-left:-15px;
			
		}
		
		.nodata_img{
			display:block;
			width:26%;
			margin:2rem auto 0;
		}
		.nodata_p{
			width:100%;
			text-align: center;
			line-height: 0.5rem;
			color:#666;
			
		}
		</style>
	</head>
	<body>
		<div class="loading">
      	  <img src="../img/jiazai.gif" class="loadImg"/> 
        </div>
		<span id="ruler" class='littleSize'></span>
		<header>
			<!-- <span class='updateTime samllSize'>更新时间：<i>2017/03/04</i></span>-->
 			<div class="title littleSize" id='title'>大唐财富诚现金管理1号投资基金(2017年)1号投资基</div>
		</header>
		<div class="container" >
			<div class='dataMes'>
				<ul class='dataUl'></u>
		</div>
		
		<!--var groomHtml="<p class='xiangguan_p littleSize pdf' pdfHref='"+content[j].value+"'>< img src='../img/tang.png' style='display:inline-block;width:0.35rem;vertical-align:-0.05rem;margin-right:0.25rem;'/>"+NameStr
												+"<span style='color:red;margin-left:0.04rem;'>"+ClassStr+"</span></p >";
												$(".xiangguan").append(groomHtml);-->
		
		
		<script>
			//详情信息；
			window.onload=function(){
				$(".loading").fadeOut();
		xiangQingAjax();
		
		function xiangQingAjax(){
			var prodType=$.getUrlParam("prodType");
			
			var orderId=$.getUrlParam("orderId");
			var prodName=$.getUrlParam("prodName");
			var custNo=$.getUrlParam("custNo");
			
			var id=$.getUrlParam("id");
			//var str='{"language":"zh_CN","orderId":"7279","prodType":"1","prodName":"XXXXXX","id":"PI000000000641"}';
			var str='{"language":"zh_CN","orderId":"'+orderId+'","prodName":"'+prodName+'","prodType":"'+prodType+'","custNo":"'+custNo+'","prodId":"'+id+'"}';
			str = Base64.encode(str);
			jQuery(function(){
					jQuery.ajax({
						url:yunying_require,
						type:"post",
						dataType:"text",
						data:{commonURL:yunying_require,'param':str,'opName':'private_trade_detail',"osFlag":'5'},
						async:false,
						success:function(serverinfo){
							console.log(serverinfo);
							var Data=Base64.decode(serverinfo);
							Data=JSON.parse(Data);
							console.log('=============================================');
							console.log(Data);
							if(Data!=''){
								$("#title").html(Data.prodName);
								if(Data.updateTime){
									$(".updateTime").html("更新时间"+Data.updateTime);
								}
								//dataUl\
								//计算标题长度
								var Text =prodName;  
								String.prototype.visualLength = function()  
								{  
							        var ruler = $("#ruler"); 
				//					alert(this);
									ruler.text(Text);
							        return ruler[0].offsetWidth;  
								} 				
								
								var len = Text.visualLength();
								var kuangWidth=$("#title").width();
								var kuangHeight=$("#title").height();
								if(len<kuangWidth){
									$("#title").css('line-height',kuangHeight+'px');
								}else{
									var lineHeight=$("#ruler")[0].offsetHeight+2;
									$("#title").css('line-height',lineHeight+'px');
								}
								
								/* alert(Data.infoList+'==Data.infoList'); */
								 if(Data.infoList){
									 	var infoList=Data.infoList;
										
										var content=infoList.content;
										//alert(content+'==content');
										if(content.length>0){
											//alert(content.length);
											for(var i=0;i<content.length;i++){
												var $li="<li pdfHref="+content[i].value+"><span class='leftSp'>"+content[i].title+"</span><span class='rightSp'><img src='../img/arrow.png' style='width:0.24rem;margin-left:0.1rem;vertical-align: -0.1rem;'/></span></li>"
												
												$(".dataUl").append($li);
											}
											$(".dataUl").on("click","li",function(){
												var href=$(this).attr("pdfHref");
												window.location.href=href;
											})
										}else{
											var $img=$('<img src="../img/nodata.png" class="nodata_img"/>');
											var $p=$('<p class="nodata_p normalSize">暂无数据</p >');
											$(".dataUl").append($img);
											$(".dataUl").append($p);
											//当没有数据时的处理方案；
													var newUlHeight=window.screen.height-$('header').height()+30;
													$('.nodata_img').css('margin-top',newUlHeight/4);
													$(".dataMes").height(newUlHeight);
													$('body').css('overflow','hidden');
											//	
										}
										
								}else{
									var $img=$('<img src="../img/nodata.png" class="nodata_img"/>');
									var $p=$('<p class="nodata_p normalSize">暂无数据</p >');
									$(".dataUl").append($img);
									$(".dataUl").append($p);
									//当没有数据时的处理方案；
											var newUlHeight=window.screen.height-$('header').height()+30;
											$('.nodata_img').css('margin-top',newUlHeight/4);
											$(".dataMes").height(newUlHeight);
											$('body').css('overflow','hidden');
									//	
								} 
								
							}
							
							
						},
						error:function(){							
						}
					})
			})
		}
		
		
		}
		</script>
	</body>
</html>
